﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="EditDirectorate.aspx.cs" Inherits="SD.Web.Iteration2.Directorate.EditDirectorate" %>

<%@ Register Src="../../Controls/Lookup/ContactLookup.ascx" TagName="ContactLookup"
    TagPrefix="uc1" %>
<%@ Register Src="../../Controls/Lookup/TypeOfBusinessLookup.ascx" TagName="TypeOfBusinessLookup"
    TagPrefix="uc2" %>
<%@ Register Src="../../Controls/Lookup/AddressLookupControl.ascx" TagName="AddressLookupControl"
    TagPrefix="uc3" %>
<asp:Content ID="head" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(function () {
            $("#tabs").tabs();
        });
    </script>
    <link href="../../style/AnhPopup.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="ContentTitle" ContentPlaceHolderID="ContentTitle" runat="server">
    <h2>
        Business Unit/Directorate Details</h2>
</asp:Content>
<asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">
    <div class="grid740 simplebox relative">
        <div id="tabs">
            <ul>
                <li>
                    <asp:HyperLink ID="LinkDetails01" NavigateUrl="#DetailsPanel01" runat="server">Details</asp:HyperLink></li>
                <li>
                    <asp:HyperLink ID="LinkDetails02" NavigateUrl="#DetailsPanel02" runat="server" Visible="false">Departments</asp:HyperLink></li>
                <%--DETAIL PANEL 05--%>
                <asp:HiddenField ID="HiddenFieldDirectorateId" runat="server" />
                <asp:HiddenField ID="HiddenFieldOrganizationId" runat="server" />
            </ul>
            <span class="top-right-cornor">
                <asp:Label ID="LabelSuccess" runat="server" Text="" ForeColor="Red"></asp:Label>
                <asp:Button CssClass="st-button" ID="ButtonDeactivate" runat="server" Text="Deactivate"
                    CausesValidation="False" OnClick="ButtonDeactivate_Click" />
                <asp:Button CssClass="st-button" ID="ButtonSave" runat="server" Text="Save" OnClick="ButtonSave_Click"
                    ValidationGroup="edit" />
                <asp:Button CssClass="st-button" ID="ButtonBack" runat="server" Text="Back" CausesValidation="False"
                    OnClick="ButtonBack_Click" />
            </span>
            <asp:Panel ID="DetailsPanel01" ClientIDMode="Static" runat="server">
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelOrganizationName" runat="server" Text="Directorate Name" CssClass="st-labeltext level1 required"
                            AssociatedControlID="TextBoxDirectorateName">
                        </asp:Label><asp:TextBox ID="TextBoxDirectorateName" CssClass="st-forminput" runat="server"
                            Width="200px"></asp:TextBox><br />
                        <asp:RequiredFieldValidator ID="RequiredDirectorateName" runat="server" ErrorMessage="Directorate Name is required"
                            Display="Dynamic" SetFocusOnError="true" ForeColor="red" ControlToValidate="TextBoxDirectorateName"
                            ValidationGroup="edit" /><asp:Label ID="LabelNameExists" runat="server" ForeColor="maroon"></asp:Label></div>
                    <div class="half last">
                        <asp:Label ID="LabelTypeOfBusiness" runat="server" Text="Type of Business" CssClass="st-labeltext level1 required"
                            AssociatedControlID="TextBoxTypeOfBusiness">
                            
                        </asp:Label><asp:TextBox ID="TextBoxTypeOfBusiness" CssClass="st-forminput st-disable"
                            runat="server" Width="150px" ReadOnly="True"></asp:TextBox><asp:LinkButton CommandName="business"
                                ID="ButtonTypeOfBusinessLookup" runat="server" CssClass="hg-blue" Text="Lookup"
                                CausesValidation="False" OnClick="ButtonTypeOfBusinessLookup_Click" /><br />
                        <asp:RequiredFieldValidator ID="RequiredTypeOfBusiness" runat="server" ErrorMessage="*"
                            Display="none" SetFocusOnError="true" ForeColor="red" ControlToValidate="TextBoxTypeOfBusiness"
                            ValidationGroup="edit" />
                        <asp:HiddenField ID="HiddenFieldBusinessId" runat="server" />
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelShortDescription" runat="server" Text="Organization Short Description"
                            CssClass="st-labeltext level1" AssociatedControlID="TextBoxShortDescription">
                            
                        </asp:Label><asp:TextBox ID="TextBoxShortDescription" CssClass="st-forminput" runat="server"
                            Width="200px" TextMode="MultiLine" Rows="3"></asp:TextBox></div>
                    <div class="half last">
                        <asp:Label ID="LabelSicCode" runat="server" Text="SIC" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxSicCode"></asp:Label><asp:TextBox ID="TextBoxSicCode"
                                CssClass="st-forminput st-disable" runat="server" Width="50px" ReadOnly="True"></asp:TextBox></div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelLeadContact" runat="server" Text="Lead Contact" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxLeadContact"></asp:Label><asp:TextBox ID="TextBoxLeadContact"
                                CssClass="st-forminput st-disable" runat="server" Width="150px" ReadOnly="True"></asp:TextBox><asp:LinkButton
                                    ID="ButtonContactLookup" runat="server" CssClass="hg-blue" Text="Lookup" CommandName="contact"
                                    CausesValidation="False" OnClick="ButtonContactLookup_Click" /><br /><asp:RequiredFieldValidator ID="RequiredFieldValidator1"
                                    runat="server" ErrorMessage="Lead contact is required" SetFocusOnError="true"
                                    ForeColor="red" ControlToValidate="TextBoxLeadContact" ValidationGroup="edit" />
                        <asp:HiddenField ID="HiddenFieldContactId" runat="server" />
                    </div>
                    <div class="half last">
                        <asp:Label ID="LabelFullDescription" runat="server" Text="Full Description" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxFullDescription"></asp:Label><asp:TextBox ID="TextBoxFullDescription"
                                CssClass="st-forminput" runat="server" Width="200px" TextMode="MultiLine" Rows="3"></asp:TextBox><br />
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelPostcode" runat="server" Text="Postcode" CssClass="st-labeltext level1 required"
                            AssociatedControlID="TextBoxPostcode">
                        </asp:Label><asp:TextBox ID="TextBoxPostcode" CssClass="st-forminput st-disable"
                            runat="server" Width="150px" ReadOnly="True"></asp:TextBox><asp:LinkButton ID="ButtonPostcodeLookup"
                                runat="server" CssClass="hg-blue" Text="Lookup" CommandName="postcode" CausesValidation="False"
                                OnClick="ButtonPostcodeLookup_Click" /><asp:RequiredFieldValidator ID="RequiredPostcode"
                                    runat="server" ErrorMessage="PostCode is required" Display="Dynamic" SetFocusOnError="true"
                                    ForeColor="red" ControlToValidate="TextBoxPostcode" ValidationGroup="edit" />
                        <asp:HiddenField ID="HiddenFieldAddressId" runat="server" />
                        <br />
                        <br />
                        <asp:Label ID="LabelAddressLine1" runat="server" Text="Address Line 1" CssClass="st-labeltext level1 required"
                            AssociatedControlID="TextBoxAddressLine1">
                        </asp:Label><asp:TextBox ID="TextBoxAddressLine1" CssClass="st-forminput st-disable"
                            runat="server" Width="200px" ReadOnly="True"></asp:TextBox><br />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Address Line 1 is required"
                            Display="Dynamic" SetFocusOnError="true" ForeColor="red" ControlToValidate="TextBoxAddressLine1"
                            ValidationGroup="edit" /><br />
                        <asp:Label ID="LabelAddressLine2" runat="server" Text="Address Line 2" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxAddressLine2"></asp:Label><asp:TextBox ID="TextBoxAddressLine2"
                                CssClass="st-forminput st-disable" runat="server" Width="200px" ReadOnly="True"></asp:TextBox><br />
                        <br />
                        <asp:Label ID="LabelAddressLine3" runat="server" Text="Address Line 3" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxAddressLine3"></asp:Label><asp:TextBox ID="TextBoxAddressLine3"
                                CssClass="st-forminput st-disable" runat="server" Width="200px" ReadOnly="True"></asp:TextBox></div>
                    <div class="half last">
                        <asp:Label ID="LabelPhoneNumber" runat="server" Text="Phone Number" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxPhoneNumber">
                        </asp:Label><asp:TextBox ID="TextBoxPhoneNumber" CssClass="st-forminput" runat="server"
                            Width="200px"></asp:TextBox><div class="clear">
                            </div>
                        <br />
                        <asp:Label ID="LabelFax" runat="server" Text="Fax" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxFax">
                        </asp:Label><asp:TextBox ID="TextBoxFax" CssClass="st-forminput" runat="server" Width="200px"></asp:TextBox><div
                            class="clear">
                        </div>
                        <br />
                        <asp:Label ID="LabelEmail" runat="server" Text="Email" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxEmail">
                        </asp:Label><asp:TextBox ID="TextBoxEmail" CssClass="st-forminput" runat="server"
                            Width="200px"></asp:TextBox><div class="clear">
                            </div>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBoxEmail"
                            Display="Dynamic" EnableTheming="True" ErrorMessage="Email is not valid" ForeColor="Red"
                            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="edit"></asp:RegularExpressionValidator><br />
                        <asp:Label ID="LabelWebAddress" runat="server" Text="Web Address" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxWebAddress">
                        </asp:Label><asp:TextBox ID="TextBoxWebAddress" CssClass="st-forminput" runat="server"
                            Width="200px"></asp:TextBox><div class="clear">
                            </div>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ForeColor="Red"
                            ControlToValidate="TextBoxWebAddress" Display="Dynamic" ErrorMessage="Web Address format is invalid"
                            ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?" ValidationGroup="edit"></asp:RegularExpressionValidator></div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelCounty" runat="server" Text="County" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxCounty"></asp:Label><asp:TextBox ID="TextBoxCounty" CssClass="st-forminput"
                                runat="server" Width="200px"></asp:TextBox>
                    </div>
                    <div class="half last">
                        <asp:Label ID="LabelCharityNumber" runat="server" Text="Charity Number" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxCharityNumber"></asp:Label><asp:TextBox ID="TextBoxCharityNumber"
                                CssClass="st-forminput" runat="server" Width="200px"></asp:TextBox></div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelCityTown" runat="server" Text="City/Town" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxCityTown"></asp:Label><asp:TextBox ID="TextBoxCityTown"
                                CssClass="st-forminput" runat="server" Width="200px"></asp:TextBox></div>
                    <div class="half last">
                        <asp:Label ID="LabelCompanyNumber" runat="server" Text="Company Number" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxCompanyNumber"></asp:Label><asp:TextBox ID="TextBoxCompanyNumber"
                                CssClass="st-forminput" runat="server" Width="200px"></asp:TextBox></div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelNationCountry" runat="server" Text="Nation Country" CssClass="st-labeltext level1"
                            AssociatedControlID="DropDownListNationCountry"></asp:Label><asp:DropDownList ID="DropDownListNationCountry"
                                runat="server" CssClass="st-forminput" Width="200px" DataTextField="CountryName"
                                DataValueField="CountryId">
                            </asp:DropDownList>
                    </div>
                    <div class="half last">
                        <asp:Label ID="Label1" runat="server" Text="Active" CssClass="st-labeltext level1"></asp:Label><asp:Label
                            ID="LabelIsActive" runat="server" Text="Yes" CssClass="st-labeltext level1"></asp:Label></div>
                    <div class="clear">
                    </div>
                </div>
            </asp:Panel>
            <asp:Panel ID="DetailsPanel02" runat="server" ClientIDMode="Static" Visible="false">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:PlaceHolder ID="HolderDepartmentList" runat="server" />
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <uc1:ContactLookup ID="ContactLookup1" runat="server" Visible="True" HiddenFieldResultId="HiddenFieldContactId"
                TextBoxResultId="TextBoxLeadContact" />
        </div>
        <uc2:TypeOfBusinessLookup ID="TypeOfBusinessLookup1" runat="server" HiddenFieldBusinessId="HiddenFieldBusinessId"
            TextBoxBusinessNameId="TextBoxTypeOfBusiness" Visible="True" TextBoxSicCodeId="TextBoxSicCode" />
        <uc3:AddressLookupControl ID="AddressLookupControl1" runat="server" Visible="True" />
    </div>
</asp:Content>
